/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.sistemas.sse.dao.impl;

import java.util.List;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import pe.edu.sistemas.sse.dao.IPromocionIngresoDao;
import pe.edu.sistemas.sse.entity.Eap;
import pe.edu.sistemas.sse.entity.PromocionIngreso;
import pe.edu.sistemas.sse.util.HibernateUtil;

/**
 *
 * @author laptop-w8
 */
@Repository("PromocionIngresoDao")
public class PromocionIngresoDao implements IPromocionIngresoDao {

    @Autowired
    private SessionFactory sessionFactory;

    @Override
    public boolean agregarPromocionIngreso(PromocionIngreso promo) {
        return HibernateUtil.agregarEntidad(sessionFactory, promo);
    }

    @Override
    public boolean actualizarPromocionIngreso(PromocionIngreso promo) {
        return HibernateUtil.actualizarEntidad(sessionFactory, promo);
    }

    @Override
    public PromocionIngreso obtenerPromocionIngreso(PromocionIngreso promo) {
        return HibernateUtil.obtenerEntidad(sessionFactory, PromocionIngreso.class, promo.getId_promocionIngreso());
    }

    @Override
    public boolean existePromocionIngreso(PromocionIngreso promo) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public List<PromocionIngreso> obtenerListaPromocionIngreso(Eap carrera) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

}
